#include "widget.h"
#include "ui_widget.h"
#include <QDebug>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_clicked()
{
    //获取用户的选择
    QString str = "你的选择是 : ";
    if(ui->checkBox_1->isChecked())
        str += ui->checkBox_1->text() + ' ';
    if(ui->checkBox_2->isChecked())
        str += ui->checkBox_2->text() + ' ';
    if(ui->checkBox_3->isChecked())
        str += ui->checkBox_3->text() + ' ';
    if(ui->checkBox_4->isChecked())
        str += ui->checkBox_4->text() + ' ';
    if(ui->checkBox_5->isChecked())
        str += ui->checkBox_5->text() + ' ';
    qDebug() << str;
    ui->label->setText(str);
}
